package com.blog.dao.adminarticle;

import com.blog.dao.conn.BaseDao;
import com.blog.dao.conn.ParamSet;
import com.blog.dao.frontpage.PersoncenterDao;
import com.blog.entity.AdminArticleDetailEntity;

public class AdminArticleDao extends BaseDao{
	private static AdminArticleDao instance;
	private AdminArticleDao() {
		
	}
	public static synchronized AdminArticleDao getInstance() {
		if(instance==null) {
			instance=new AdminArticleDao();
		}
		return instance;
	}
	/**
	 * 1.根据博客id查询文章内容和标题
	 */
	public AdminArticleDetailEntity getArticleContent(int id) {
		String sql="select article_title,article_content from tb_article where article_id=?";
		return query(sql,new ParamSet(id),AdminArticleDetailEntity.class);
	}
}
